import {reactive} from 'vue'
 import {onLoad} from '@dcloudio/uni-app'
export function getLocalDetail(onLoadCallBack) {
	
	const data = reactive({
		type: 'book',
		info: {
			"name": "这里是图片名称",
			"cover": "static/data/img/1.jpg",
			"img": [
				"https://inews.gtimg.com/news_bt/OoZt6eykmUPJ9-QgWyttZg8e0B4Nw_9aNs6OA65dgkksAAA/1000",
				"https://inews.gtimg.com/news_bt/OoZt6eykmUPJ9-QgWyttZg8e0B4Nw_9aNs6OA65dgkksAAA/1000"
			],
			"content": [
				"这是第一段内容",
				"这是第二段内容"
			]
		}
	})
	onLoad(() => {
		const fingerTipDetail = localStorage.getItem('fingerTipDetail')
		if (fingerTipDetail) {
			Object.assign(data, JSON.parse(fingerTipDetail))
			onLoadCallBack && onLoadCallBack()
		}
	})
	
	return {
		data
	}
}